<template>
  <div>
    <h1>{{msg}}</h1>
    <button @click="rev">点击</button>
  </div>
</template>

<script>
export default {
  name: 'VueDemoApp',

  data() {
    return {
      msg:'HELLO,WORLD'
    };
  },
methods:{
  rev(){
    // split 分解成数组
    const arr=this.msg.split('')
    //reverse  调转顺序
    this.msg=arr.reverse().join('')
  }
}
 
};
</script>

<style lang="scss" scoped>

</style>